package com.yuw.oop.extendsdemo;

/**
 * @author Administrator
 *
 */
public class Animal {
	// 属性
	private String animalName;
	private String animalSex;
	private double animalAge;

	// 行为
	/**
	 * 动物发出叫声的行为
	 */
	public void speak() {
		System.out.println(animalName + " animal speaks...");
	}

	/**
	 * 动物进食的行为
	 */
	public void eat() {
		System.out.println(animalName + " animal eats...");
	}

	/**
	 * 动物睡觉的行为
	 */
	public void sleep() {
		System.out.println(animalName + " animal sleep...");
	}

	//////////////////////////////////////

	public Animal(String animalName, String animalSex, double animalAge) {
		super();
		this.animalName = animalName;
		this.animalSex = animalSex;
		this.animalAge = animalAge;
	}

	public Animal() {
		super();
	}

	public String getAnimalName() {
		return animalName;
	}

	public void setAnimalName(String animalName) {
		this.animalName = animalName;
	}

	public String getAnimalSex() {
		return animalSex;
	}

	public void setAnimalSex(String animalSex) {
		this.animalSex = animalSex;
	}

	public double getAnimalAge() {
		return animalAge;
	}

	public void setAnimalAge(double animalAge) {
		this.animalAge = animalAge;
	}

}
